package com.own.component.client.impl;

import com.own.component.client.base.RequestClientManager;
import com.own.component.client.property.ClientProperty;

import javax.servlet.http.HttpServletRequest;

/**
 * DefaultHeaderRequestClientManager
 *
 * @author chenxueli
 * @date 2023-06-13 15:39:00
 */
public class DefaultHeaderRequestClientManager extends RequestClientManager {

    public DefaultHeaderRequestClientManager(ClientProperty clientProperty) {
        super(clientProperty);
    }

    /**
     * 获取客户端信息
     *
     * @return 客户端信息
     */
    @Override
    public String client(HttpServletRequest request) {
        return request == null ? null : request.getHeader(this.getClientField());
    }

}
